package io.github.wanggit.antcms.server.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import io.github.wanggit.antcms.server.domain.AntArticle;
import io.github.wanggit.antcms.server.web.vm.ArticleVM;
import io.github.wanggit.antcms.server.web.vm.ListArticlesVM;
import io.github.wanggit.antcms.server.web.vm.Result;

public interface ArticleService extends IService<AntArticle> {
    Page<AntArticle> listArticles(
            int page, int size, Integer catalogId, Integer tagId, String titlePattern);

    Result saveArticle(ArticleVM articleVM);

    Result publishArticle(Long id);

    Result unpublishArticle(Long id);

    Result detailArticle(Long id);

    Result trashArticle(Long id);

    Result forceDeleteArticle(Long id);

    Result untrashArticle(Long id);

    Result queryAllLastUpdateTime();

    Result listArticles(ListArticlesVM listArticlesVM);
}
